home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / ListP.h.z / ListP.h
C/C++ Source or Header  |  2002-10-15  |  6KB  |  224 lines

  1. /* 
  2.  *  @OSF_COPYRIGHT@
  3.  *  COPYRIGHT NOTICE
  4.  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
  5.  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  6.  *  the full copyright text.
  7. */ 
  8. /* 
  9.  * HISTORY
  10. */ 
  11. /* $XConsortium: ListP.h /main/12 1995/09/19 23:04:39 cde-sun $ */
  12. /* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  13. #ifndef _XmListP_h
  14. #define _XmListP_h
  15.  
  16. #include <Xm/List.h>
  17. #include <Xm/PrimitiveP.h>
  18. #include <Xm/ScrollBar.h>
  19. #include <Xm/ScrolledW.h>
  20. #include <Xm/XmosP.h>
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /* List struct passed to Convert proc for drag and drop */
  27. typedef struct _XmListDragConvertStruct
  28. {
  29.   Widget    w;
  30.   XmString *strings;
  31.   int       num_strings;
  32. } XmListDragConvertStruct;
  33.  
  34. /* List class structure */
  35. typedef struct _XmListClassPart
  36. {
  37.   XtPointer extension;        /* Pointer to extension record */
  38.   
  39. #ifdef _SGIMOTIF
  40.   XtPointer    _SG_vendorExtension;
  41. #endif
  42.  
  43. } XmListClassPart;
  44.  
  45.  
  46. /* Full class record declaration for List class */
  47. typedef struct _XmListClassRec
  48. {
  49.   CoreClassPart        core_class;
  50.   XmPrimitiveClassPart primitive_class;
  51.   XmListClassPart      list_class;
  52. } XmListClassRec;
  53.  
  54. externalref XmListClassRec xmListClassRec;
  55.  
  56. /* Internal form of the list elements. */
  57. typedef    struct {
  58.   Dimension     height;
  59.   Dimension     width;
  60.   Boolean     selected;
  61.   Boolean     last_selected;
  62.   Boolean     LastTimeDrawn;
  63.   int         length;
  64.   wchar_t     first_char;
  65. } Element, *ElementPtr;
  66.  
  67. /* The List instance record */
  68. typedef struct _XmListPart
  69. {
  70.   Dimension        spacing;
  71.   short             ItemSpacing;
  72.   Dimension         margin_width;
  73.   Dimension            margin_height;
  74.   XmFontList         font;
  75.   XmString       *items;
  76.   int            itemCount;
  77.   XmString       *selectedItems;
  78.   int              *selectedPositions;    /* "selectedIndices" in Motif 1.2 */
  79.   int            selectedItemCount;
  80.   int             visibleItemCount;
  81.   int             LastSetVizCount;
  82.   unsigned char        SelectionPolicy;
  83.   unsigned char        ScrollBarDisplayPolicy;
  84.   unsigned char        SizePolicy;
  85.   XmStringDirection StrDir;
  86.  
  87.   XtEnum        AutoSelect;
  88.   Boolean        DidSelection;
  89.   Boolean        FromSetSB;
  90.   Boolean        FromSetNewSize;
  91.   unsigned char        SelectionMode;    /* "Boolean AddMode" in Motif 1.2 */
  92.   unsigned char        LeaveDir;
  93.   unsigned char        HighlightThickness;
  94.   int             ClickInterval;
  95.   XtIntervalId        DragID;
  96.   XtCallbackList    SingleCallback;
  97.   XtCallbackList    MultipleCallback;
  98.   XtCallbackList    ExtendCallback;
  99.   XtCallbackList    BrowseCallback;
  100.   XtCallbackList    DefaultCallback;
  101.   
  102.   
  103.   GC        NormalGC;    
  104.   GC        InverseGC;
  105.   GC        HighlightGC;
  106.   Pixmap        DashTile;    /* unused in Motif 1.2 */
  107.   ElementPtr   *InternalList;
  108.   int        LastItem;    /* position of last item in list */
  109.   int        FontHeight;    /* unused in Motif 1.2 */
  110.   int        top_position;
  111.   char        Event;
  112.   int        LastHLItem;
  113.  
  114.   /* These fields specify the boundaries of the selection (i.e.
  115.    * the current selection) as specified by the "selected" field
  116.    * of the InternalList elements and the boundaries of the 
  117.    * last_selected selection (i.e. the previous selection) as
  118.    * specified by the "last_selected" field of the InternalList
  119.    * elements.
  120.    */
  121.   int        StartItem;
  122.   int        OldStartItem;
  123.   int        EndItem;
  124.   int        OldEndItem;
  125.  
  126.   Position    BaseX;
  127.   Position    BaseY;
  128.  
  129.   /* MouseMoved: unused resource from Motif1.2, used now in the
  130.    * CheckSetRenderTable default proc (see List.c). 
  131.    */
  132.   Boolean    MouseMoved;
  133.  
  134.   Boolean    AppendInProgress;
  135.   Boolean    Traversing;
  136.   Boolean    KbdSelection;
  137.   short        DownCount;
  138.   Time        DownTime;
  139.   int        CurrentKbdItem;    /* position of location cursor */
  140.   unsigned char    SelectionType;
  141.   GC        InsensitiveGC;
  142.   
  143.   int vmin;            /* unused in Motif 1.2 */
  144.   int vmax;            /* unused in Motif 2.0 */
  145.   int vOrigin;            /* unused in Motif 2.0 */
  146.   int vExtent;            /* unused in Motif 2.0 */
  147.   
  148.   int hmin;            /* slider minimum coordiate position */
  149.   int hmax;            /* slider maximum coordiate position */
  150.   int hOrigin;            /* slider edge location              */
  151.   int hExtent;            /* slider size                       */
  152.  
  153.   Dimension    MaxWidth;
  154.   Dimension    CharWidth;    /* unused in Motif 1.2 */
  155.   Position    XOrigin;
  156.     
  157.   XmScrollBarWidget      hScrollBar;
  158.   XmScrollBarWidget      vScrollBar;
  159.   XmScrolledWindowWidget  Mom;
  160.   Dimension          MaxItemHeight;
  161.  
  162.   /*--- New fields in Motif 2.0. ---*/
  163.   int        selectedPositionCount;
  164.  
  165. #ifdef _SGIMOTIF
  166.   XtPointer    _SG_vendorExtension;
  167. #endif
  168.  
  169.   unsigned char    matchBehavior;
  170.  
  171.   /* The AutoSelectionType is used to designate where in the selection
  172.    * process the user currently is when auto select is enabled. For
  173.    * instance, during an extended select, there is a beginning to
  174.    * the selection, possible mouse motions and finally a button release
  175.    * resulting in either a selection identical to what was selected
  176.    * before the beginning or to a selection that is different.
  177.    */
  178.   unsigned char    AutoSelectionType;
  179.  
  180.   /* PrimaryOwnership is used to describe how the list show take
  181.    * ownership of the primary selection when the user selects list
  182.    * items, with a possible value of NEVER.
  183.    */
  184.   unsigned char    PrimaryOwnership;
  185.  
  186.   XtCallbackList DestinationCallback;
  187.  
  188.   /* Selection rendition fields */
  189.   XmRendition    scratchRend;
  190.   Pixel        selectColor;
  191.  
  192.   /* This field is used to house the top position of the list before a
  193.    * scrolling action begins. If the scrolling action is cancelled, then
  194.    * we restore the list top position by using this field. When scrolling
  195.    * by directly using the scroll bar, we don't need this field since the
  196.    * scroll frame trait handles the reset. When scrolling by selecting
  197.    * items and dragging off the edge of the list, we need to use this
  198.    * field to reset the list position when a user presses the cancel key.
  199.    */
  200.   int        previous_top_position;
  201.  
  202.   XtIntervalId    drag_start_timer;
  203.   char *    drag_abort_action;
  204.   XEvent    drag_event;
  205.   XmListDragConvertStruct *drag_conv;
  206. } XmListPart;
  207.  
  208.  
  209. /* Full instance record declaration */
  210. typedef struct _XmListRec
  211. {
  212.   CorePart      core;
  213.   XmPrimitivePart primitive;
  214.   XmListPart      list;
  215. } XmListRec;
  216.  
  217.  
  218. #ifdef __cplusplus
  219. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  220. #endif
  221.  
  222. #endif /* _XmListP_h */
  223. /* DON'T ADD ANYTHING AFTER THIS #endif */
  224.